import {RequestUtil} from '@/utils'

export class SystemHttp {
    static PREFIX = "/manager/system"


    // ====== 角色管理接口 ============
    static getRolePage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/role/pageList`, params)

    static addRole = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/role/add`, data)

    static updateRole = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/role/update/${id}`, data)

    static delRole = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/role/delete`, data)


    // ====== 账号管理接口 ============
    static getAccountPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/account/pageList`, params)

    static addAccount = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/account/add`, data)

    static updateAccount = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/account/update/${id}`, data)

    static delAccount = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/account/delete`, data)


    static resetPsw = (id: string | number) => RequestUtil.putAjax(`${this.PREFIX}/account/resetPsw/${id}`)









}
